package com.controller;
 
import java.util.List;

import com.entity.Node;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.entity.Type;
import com.service.TypeService;

@Api(value = "类型查询", tags = "TypeApi", consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
@RestController
@RequestMapping("/typeTree")
public class TypeController {
 //http://localhost:8088/typeTree/getAllType

    @Autowired
    private TypeService typeService;


    @ApiOperation(value = "getAllType", notes = "类型查询")
    @RequestMapping(value = "getAllType", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
//    @RequestMapping("getAllType")
    public List<Type> getTypeTree(){
    	return typeService.getTypeTree();
    }


}